<template>
  <div>
    <div class="sss">
      <van-tabs @click="onClick" v-model="active">
        <van-tab title="标签 1">
          <div class="ssss" slot="title">
            <div ></div>
            <img src="img/vip/3.png" />
          </div>
            </van-tab>
        <van-tab title="标签 2"><div slot="title">
            <img src="img/vip/3.png" /></div></van-tab>
        <van-tab title="标签 3"></van-tab>
        <van-tab title="标签 4"></van-tab>
        <van-tab title="标签 5"></van-tab>
        <van-tab title="标签 6"></van-tab>
      </van-tabs>
    </div>
    <div class="ss">
      <van-swipe
        @change="onChange"
        class="my-swi"
        autoplay="true"
        indicator-color="white"
        :initial-swipe="active"
      >
        <van-swipe-item name="1">1</van-swipe-item>
        <van-swipe-item name="2" change>ddd</van-swipe-item>
        <van-swipe-item name="3">3</van-swipe-item>
        <van-swipe-item name="4">4</van-swipe-item>
        <van-swipe-item name="5">4</van-swipe-item>
        <van-swipe-item name="6">4</van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: "2",
    };
  },
  methods: {
    onChange(index) {
      this.active = index;
    },
    
    onClick(name, title) {
    //console.log(name,title);
    },
  },
};
</script>

<style lang="scss" scoped>
.sss {
  width: 100%;
  white-space: nowrap;
  overflow-x: scroll;
  //取消滚动条
  &::-webkit-scrollbar {
    display: none;
  }
}
.tabs {
  width: 200%;
}
::v-deep .van-tabs--line .van-tabs__wrap {
  height: 5rem;
}
::v-deep .van-swipe__track {
  margin-top: 1rem;
  width: 100%;
}
::v-deep.van-tabs__wrap--scrollable .van-tab {
  width: 1rem;
}
::v-deep .van-tab--active {
}
::v-deep.van-tab__text {
  display: block;
  width: 100%;
  height: 100%;
}
::v-deep .van-tabs__nav--line {
  z-index: 1100;
  position: absolute;

  top: 0px;
  background: rgba(30, 30,30, 0.5);

}
::v-deep .van-tabs__line {
  display: none;
}
.ssss{
  position: relative;
}
.ssss div{
  position: absolute;
  z-index: 1;
  top: 0rem;
  width: 100%;
  height: 100%;
}
</style>